#!/bin/sh

local_branch=$(git rev-parse --abbrev-ref HEAD)
remote_branch="origin/master"

# Fetch the latest changes from the remote repository
git fetch

# Check if there are any changes in the remote "develop" branch
if [[ $(git log HEAD..$remote_branch --oneline) ]]; then
  echo "Error: There are new commits in the remote 'develop' branch. Please rebase before pushing."
  exit 1
else
  echo "Your are at latest!"
fi

exit 0